import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    property bool airplaneMode: false

    SwitchDelegate {
        anchors.centerIn: parent
        text: "Airplane Mode"
        onCheckedChanged: setAirplaneMode(checked)

        function setAirplaneMode(is_checked) {
            airplaneMode = is_checked;
            console.log("mode: " + airplaneMode)
        }
    }
}
